<?php  
	session_start();
    require('../Model/mysql.php');
    require('../host_config.php');
    if ($_SESSION["flag"] != 2) {
    	echo "<script language='javascript'>";
        echo "alert('You have no permission to read this page!');";
        echo "history.back();";
        echo "</script>";
        header("location:../login.php");
    }
	$mysql = new MySQL();
    $link = $mysql->connect($mysql_host, $mysql_user, $mysql_passwd, $mysql_db);
    $id = $mysql->real($_GET["id"]);
    //$id = $_GET["id"];
    //$id = mysql_real_escape_string($id);
    $sql = "DELETE FROM LoginUser WHERE loginid = '$id'";
    $result = $mysql->query($sql, $link);
    header("location:list.php");
?>